package com.suwenhao.listener;


import com.suwenhao.schedule.MeetingTask;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.util.Date;
import java.util.Timer;

/**
 * @Author:suwenhao
 * @Description: 测试
 * @Date: Created in 2020/9/26 15:15
 */

//@WebListener
public class ApplicationListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {

        Timer timer = new Timer();
        MeetingTask myTask = new MeetingTask();

        timer.schedule(myTask, new Date(), 1000*10);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
